3.347 \(\int \frac {\sqrt {x} (A+B x)}{a+b x} \, dx\)

Optimal. Leaf size=69 \[ -\frac {2 \sqrt {a} (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{b^{5/2}}+\frac {2 \sqrt {x} (A b-a B)}{b^2}+\frac {2 B x^{3/2}}{3 b} \]

[Out]

2/3*B*x^(3/2)/b-2*(A*b-B*a)*arctan(b^(1/2)*x^(1/2)/a^(1/2))*a^(1/2)/b^(5/2)+2*(A*b-B*a)*x^(1/2)/b^2

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {80, 50, 63, 205} \[ \frac {2 \sqrt {x} (A b-a B)}{b^2}-\frac {2 \sqrt {a} (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{b^{5/2}}+\frac {2 B x^{3/2}}{3 b} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[x]*(A + B*x))/(a + b*x),x]

[Out]

(2*(A*b - a*B)*Sqrt[x])/b^2 + (2*B*x^(3/2))/(3*b) - (2*Sqrt[a]*(A*b - a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/
b^(5/2)

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin {align*} \int \frac {\sqrt {x} (A+B x)}{a+b x} \, dx &=\frac {2 B x^{3/2}}{3 b}+\frac {\left (2 \left (\frac {3 A b}{2}-\frac {3 a B}{2}\right )\right ) \int \frac {\sqrt {x}}{a+b x} \, dx}{3 b}\\ &=\frac {2 (A b-a B) \sqrt {x}}{b^2}+\frac {2 B x^{3/2}}{3 b}-\frac {(a (A b-a B)) \int \frac {1}{\sqrt {x} (a+b x)} \, dx}{b^2}\\ &=\frac {2 (A b-a B) \sqrt {x}}{b^2}+\frac {2 B x^{3/2}}{3 b}-\frac {(2 a (A b-a B)) \operatorname {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\sqrt {x}\right )}{b^2}\\ &=\frac {2 (A b-a B) \sqrt {x}}{b^2}+\frac {2 B x^{3/2}}{3 b}-\frac {2 \sqrt {a} (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{b^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 63, normalized size = 0.91 \[ \frac {2 \sqrt {a} (a B-A b) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{b^{5/2}}+\frac {2 \sqrt {x} (-3 a B+3 A b+b B x)}{3 b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[x]*(A + B*x))/(a + b*x),x]

[Out]

(2*Sqrt[x]*(3*A*b - 3*a*B + b*B*x))/(3*b^2) + (2*Sqrt[a]*(-(A*b) + a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/b^(
5/2)

________________________________________________________________________________________

fricas [A]  time = 0.80, size = 129, normalized size = 1.87 \[ \left [-\frac {3 \, {\left (B a - A b\right )} \sqrt {-\frac {a}{b}} \log \left (\frac {b x - 2 \, b \sqrt {x} \sqrt {-\frac {a}{b}} - a}{b x + a}\right ) - 2 \, {\left (B b x - 3 \, B a + 3 \, A b\right )} \sqrt {x}}{3 \, b^{2}}, \frac {2 \, {\left (3 \, {\left (B a - A b\right )} \sqrt {\frac {a}{b}} \arctan \left (\frac {b \sqrt {x} \sqrt {\frac {a}{b}}}{a}\right ) + {\left (B b x - 3 \, B a + 3 \, A b\right )} \sqrt {x}\right )}}{3 \, b^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*x^(1/2)/(b*x+a),x, algorithm="fricas")

[Out]

[-1/3*(3*(B*a - A*b)*sqrt(-a/b)*log((b*x - 2*b*sqrt(x)*sqrt(-a/b) - a)/(b*x + a)) - 2*(B*b*x - 3*B*a + 3*A*b)*
sqrt(x))/b^2, 2/3*(3*(B*a - A*b)*sqrt(a/b)*arctan(b*sqrt(x)*sqrt(a/b)/a) + (B*b*x - 3*B*a + 3*A*b)*sqrt(x))/b^
2]

________________________________________________________________________________________

giac [A]  time = 1.27, size = 64, normalized size = 0.93 \[ \frac {2 \, {\left (B a^{2} - A a b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} b^{2}} + \frac {2 \, {\left (B b^{2} x^{\frac {3}{2}} - 3 \, B a b \sqrt {x} + 3 \, A b^{2} \sqrt {x}\right )}}{3 \, b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*x^(1/2)/(b*x+a),x, algorithm="giac")

[Out]

2*(B*a^2 - A*a*b)*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*b^2) + 2/3*(B*b^2*x^(3/2) - 3*B*a*b*sqrt(x) + 3*A*b^2
*sqrt(x))/b^3

________________________________________________________________________________________

maple [A]  time = 0.01, size = 78, normalized size = 1.13 \[ -\frac {2 A a \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b}\, b}+\frac {2 B \,a^{2} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b}\, b^{2}}+\frac {2 B \,x^{\frac {3}{2}}}{3 b}+\frac {2 A \sqrt {x}}{b}-\frac {2 B a \sqrt {x}}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*x^(1/2)/(b*x+a),x)

[Out]

2/3*B*x^(3/2)/b+2/b*A*x^(1/2)-2/b^2*B*a*x^(1/2)-2*a/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x^(1/2))*A+2*a^2/b^2/
(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x^(1/2))*B

________________________________________________________________________________________

maxima [A]  time = 2.04, size = 58, normalized size = 0.84 \[ \frac {2 \, {\left (B a^{2} - A a b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} b^{2}} + \frac {2 \, {\left (B b x^{\frac {3}{2}} - 3 \, {\left (B a - A b\right )} \sqrt {x}\right )}}{3 \, b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*x^(1/2)/(b*x+a),x, algorithm="maxima")

[Out]

2*(B*a^2 - A*a*b)*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*b^2) + 2/3*(B*b*x^(3/2) - 3*(B*a - A*b)*sqrt(x))/b^2

________________________________________________________________________________________

mupad [B]  time = 0.39, size = 76, normalized size = 1.10 \[ \sqrt {x}\,\left (\frac {2\,A}{b}-\frac {2\,B\,a}{b^2}\right )+\frac {2\,B\,x^{3/2}}{3\,b}+\frac {2\,\sqrt {a}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\sqrt {b}\,\sqrt {x}\,\left (A\,b-B\,a\right )}{B\,a^2-A\,a\,b}\right )\,\left (A\,b-B\,a\right )}{b^{5/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^(1/2)*(A + B*x))/(a + b*x),x)

[Out]

x^(1/2)*((2*A)/b - (2*B*a)/b^2) + (2*B*x^(3/2))/(3*b) + (2*a^(1/2)*atan((a^(1/2)*b^(1/2)*x^(1/2)*(A*b - B*a))/
(B*a^2 - A*a*b))*(A*b - B*a))/b^(5/2)

________________________________________________________________________________________

sympy [A]  time = 2.87, size = 212, normalized size = 3.07 \[ \begin {cases} \frac {i A \sqrt {a} \log {\left (- i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{b^{2} \sqrt {\frac {1}{b}}} - \frac {i A \sqrt {a} \log {\left (i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{b^{2} \sqrt {\frac {1}{b}}} + \frac {2 A \sqrt {x}}{b} - \frac {i B a^{\frac {3}{2}} \log {\left (- i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{b^{3} \sqrt {\frac {1}{b}}} + \frac {i B a^{\frac {3}{2}} \log {\left (i \sqrt {a} \sqrt {\frac {1}{b}} + \sqrt {x} \right )}}{b^{3} \sqrt {\frac {1}{b}}} - \frac {2 B a \sqrt {x}}{b^{2}} + \frac {2 B x^{\frac {3}{2}}}{3 b} & \text {for}\: b \neq 0 \\\frac {\frac {2 A x^{\frac {3}{2}}}{3} + \frac {2 B x^{\frac {5}{2}}}{5}}{a} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*x**(1/2)/(b*x+a),x)

[Out]

Piecewise((I*A*sqrt(a)*log(-I*sqrt(a)*sqrt(1/b) + sqrt(x))/(b**2*sqrt(1/b)) - I*A*sqrt(a)*log(I*sqrt(a)*sqrt(1
/b) + sqrt(x))/(b**2*sqrt(1/b)) + 2*A*sqrt(x)/b - I*B*a**(3/2)*log(-I*sqrt(a)*sqrt(1/b) + sqrt(x))/(b**3*sqrt(
1/b)) + I*B*a**(3/2)*log(I*sqrt(a)*sqrt(1/b) + sqrt(x))/(b**3*sqrt(1/b)) - 2*B*a*sqrt(x)/b**2 + 2*B*x**(3/2)/(
3*b), Ne(b, 0)), ((2*A*x**(3/2)/3 + 2*B*x**(5/2)/5)/a, True))

________________________________________________________________________________________